home *** CD-ROM | disk | FTP | other *** search
/ Avalon 14 / Avalon_14_1997-01-01_Avalon.d64 / morse code (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  3KB  |  79 lines

  1. 10 goto200
  2. 15 forl=itolen(m$(a)):s$=mid$(m$(a),l,i):m=t:ifs$="-"thenm=dl
  3. 20 pokevo,f:pokew,k:ford=1tom:next:pokevo,z:pokew,u:ford=1toes:next:next
  4. 30 ford=itobf:getk$:printk$;
  5. 32 ifk$=chr$(q)andb$<>""thenb$=left$(b$,len(b$)-i):goto30
  6. 34 ifk$=chr$(qq)thenb$="":print"[147]":goto30
  7. 36 b$=b$+k$:next
  8. 38 ifb$<>""then50
  9. 40 getk$:ifk$=""then40
  10. 45 b$=k$:printb$;
  11. 50 a=asc(b$):b$=right$(b$,len(b$)-i):ifa>llthen250
  12. 60 ifa=spthenford=itows:next:goto38
  13. 70 a=a-ff:ifa<ithena=i
  14. 80 goto15
  15. 90 goto20
  16. 100 ifpeek(c)=zthenl=l+i:ifl<hthen100
  17. 110 l=z:ifpeek(c)=zthenprint" ";
  18. 112 ifpeek(g)=ythenpoke198,z:goto245
  19. 115 ifpeek(c)=zthen112
  20. 120 l=l+i:ifpeek(c)then120
  21. 130 ifl>hthenx=x+x:h=(e*h+l+l+n)/f:goto150
  22. 140 x=x+x+i:h=(h+h+h+l+l+j)/b
  23. 150 l=z:ifx>rthenx=i:goto100
  24. 160 ifpeek(c)=zthenl=l+i:ifl+l<hthen160
  25. 170 ifnotl+l<hthen190
  26. 180 ifpeek(c)thenl=z:goto100
  27. 190 printmid$(r$,x,i);:x=i:l=z:goto100
  28. 200 dimm$(51):forl=1to51:readm$(l):next:s=20:gosub601
  29. 205 poke53281,o:poke53280,o:print"[147]":fori=54272to54296:pokei,o:next
  30. 210 printspc(10)"j/64 morse send/rec":printspc(9)"speed (5 to 80)"s"[157][157][157][157][157]";
  31. 215 inputs:ifs<5ors>80then210
  32. 216 poke54272,65:poke54273,51:wf=54276:ad=54277:sr=54278:wv=65:wi=wv+1
  33. 217 pokewf,wi:pokead,z:pokesr,240:pokewf,wv:poke54275,8:poke54274,o
  34. 220 print"[147]":vo=54296:z=o:w=56576:k=147:u=151:t=2300/s^1.25
  35. 225 bf=t/12:es=7500/s^2:ff=39:ll=90:sp=32:ws=3*t:dl=3*t:ifs>30thendl=4*t
  36. 230 r$=" temnaiogkdwrus??qzycxbjp?l?fvh09?8???7?+&??/=61????)?@2???3!45"
  37. 235 r$=r$+"???????:????,?????(??;????????-??'????????.??'????????????$"
  38. 240 b=4:e=9:f=12:h=16:c=56577:g=197:i=1:j=2:n=6:q=20:qq=19:r=122:x=1:y=57
  39. 241 poke56579,254
  40. 245 print:printspc(18)"xmt":goto40
  41. 250 ifa>132anda<141thena=a-132:onagoto310,330,350,370,320,340,360,380
  42. 255 ifa=95thenprint:printspc(16)"receive[146]":goto190
  43. 260 goto210
  44. 310 k$="   cq cq cq de w5vkc w5vkc k ":goto45
  45. 320 print:print:input"station call";c$
  46. 325 print:input"name";n$
  47. 328 print"[147]":goto40
  48. 330 k$=" "+c$+" de w5vkc "+b$:goto45
  49. 340 k$=" qth van alstyne, tx ? van alstyne, tx abt 50 mi n dallas. = "+b$:goto45
  50. 350 k$="so hw cpy "+n$+"? )[134]k":goto45
  51. 360 k$=" rig hr ten tec triton 4 into a dipole = keying wid a cbm 64 computer"
  52. 361 k$=k$+" = friend wb5ayd wrote software = "+b$:goto45
  53. 370 b$="":print"[147]"spc(15)"composing"
  54. 371 getk$:ifk$=chr$(136)thenprint:printspc(15)" sendind [146]":goto38
  55. 372 ifk$=""then371
  56. 373 printk$;:ifasc(k$)>132thenprint""mid$("13572468",asc(k$)-132,1)"[146]";
  57. 374 ifk$=chr$(20)thenb$=left$(b$,len(b$)-1):goto371
  58. 375 iflen(b$)=255thenprint"";:goto371
  59. 376 b$=b$+k$:goto371
  60. 380 k$=" de w5vkc "+b$:goto45
  61. 500 data........,.-.-.,-...-.-,-.--.,--..--,...-.-,.-.-.-,-..-.
  62. 510 data-----,.----,..---,...--,....-,.....,-....,--...,---..,----.
  63. 520 data---...,-.-.-.,<,-...-,>,..--..,.-...
  64. 530 data.-,-...,-.-.,-..,.,..-.,--.,....,..,.---,-.-,.-..,--,-.
  65. 540 data---,.--.,--.-,.-.,...,-,..-,...-,.--,-..-,-.--,--..
  66. 601 poke53281,1:print"[147][152]            64 morse r/t"
  67. 602 print"         adapted for the 64":print"                 by"
  68. 603 print"              tim ham [146]"
  69. 604 print"   from 'j/20 morse r/t' by r. myers"
  70. 605 print"      list 63000- for hookup info.
  71. 606 [129]t[178]1[164]5000:[130]t:[142]
  72. 63000 write:  public domain ,inc.                    5025 s. rangeline rd.
  73. 63001 :     west mil[164]n, ohio 45383
  74. 63002 :
  75. 63003 : in[160] $1.00 [129] back issue.
  76. 63004 :   ask [129] vol.1 no.21 [129]
  77. 63005 : the recieve [173] transmit circuit                [129] j[173]20 m[176]se.
  78. 63006 : journal[173]20 was published                  by mike apsey w5vkc
  79.